package com.huabo.cybermonitor.util;

import com.hbfk.entity.DealUserToken;
import com.hbfk.entity.TblStaffUtil;
import com.hbfk.util.JsonBean;

import java.util.Objects;

public interface ConstClass {

    public static final int DEFAULT_SIZE = 20;

    static boolean checkToken(String token){
        try {
            TblStaffUtil staff = DealUserToken.parseUserToken(token);
            return Objects.isNull(staff) ? false :true;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return false;
    }

    static JsonBean tokenFailure(){
       return new JsonBean(200,"没有token,或者token错误.","");
    }

}
